<template>
<div>
    <div style="margin: bottom 30px;">
<h1>修改汽车品牌</h1>
    </div>
<div>
    <div>汽车品牌名称:</div>
    <el-input v-model="input" style="width:300px"></el-input>
</div>
<div>
    <el-button type="primary" plain @click="submit">提交</el-button>
    <el-button plain @click="quxiao">取消</el-button>
</div>
</div>
</template>

<script>
import flfApi from '../http/flfApi'
  export default {
   

    data() {
      return {
        flfApi:flfApi,
         input:''
        }
      },
    
    methods: {
        quxiao(){
        this.$router.push("/CarBrand");
        },
      submit (){
        if(this.input==""){
              this.$message.error('请输入汽车品牌名称');
        }else{
            this.$router.push("/CarBrand");
            this.flfApi.addCar(this.input)
            this.getInit();
        }

      }
    }
  }

</script>